<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Extend Cache PDFs</title>
    <link rel="stylesheet" href="doc.css">
  </head>
  <body>
<!--#include virtual="_header.html" -->


  <div id=content>
<h1>Extend Cache PDFs</h1><h2>Configuration</h2>
<p>
The 'Extend Cache PDFs' filter is enabled by specifying:
</p>
<dl>
  <dt>Apache:<dd><pre class="prettyprint"
     >ModPagespeedEnableFilters extend_cache_pdfs</pre>
  <dt>Nginx:<dd><pre class="prettyprint"
     >pagespeed EnableFilters extend_cache_pdfs;</pre>
</dl>
in the configuration file.

<h2>Description</h2>
<p>
'Extend Cache PDFs' is a version of <a href="filter-cache-extend">Extend
Cache</a> that acts on PDFs.  Unlike 'Extend Cache' it applies not only to
resources but also to hyperlinks.  For example, while 'Extend Cache' would not
apply to <code>&lt;a href=&quot;example.jpg&quot;&gt;</code>, 'Extend Cache
PDFs' would apply to <code>&lt;a href=&quot;example.pdf&quot;&gt;</code>.
</p>

<h2>Operation</h2>
<p>
<a href="filter-cache-extend#operation">Extend Cache: Operation</a> describes
the standard operation of cache extension in PageSpeed.  This filter identifies
PDF URLs by their ".pdf" extension and marks them as eligible for cache
extension.
</p>
<h3>Example</h3>
<p>
You can see the filter in action at <code>www.modpagespeed.com</code> for
cache-extending PDFs
<a
href="https://www.modpagespeed.com/examples/extend_cache_pdfs.html?ModPagespeed=on&amp;ModPagespeedFilters=extend_cache_pdfs"
>in HTML</a>.
</p>

<h2>Limitations</h2>
<p>
In addition to the <a href="filter-cache-extend#limitations">limitations of
Extend Cache</a>, this filter is limited by its reliance on file extensions for
identifying potential PDF URLs.  PDF resources with URLs ending in something
other than ".pdf" won't be considered for cache extension.
</p>
<h2>Risks</h2>
<p>
This filter has the same risks as <a href="filter-cache-extend#risks">Extend
Cache</a>.
</p>
  </div>
  <!--#include virtual="_footer.html" -->
  </body>
</html>
